<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<div id="box_top">
		<div class="top">
			<div class="left fl">
				<img src="http://localhost/me/11.7/Easycms/Template/default/images/logo.gif" alt="logo">
			</div>
			<div class="right fr">
				<p>
					<a href="">设为首页</a><span>|</span>
					<a href="">加入收藏</a><span>|</span>
					<a href="">联系我们</a>
				</p>
				<form action="" method="post">
					<input type="text" name="key" class="input_text fl" size="28" placeholder="请输入关键词">
					<input type="submit" class="sub fl" value="搜索">
				</form>
			</div>
		</div>
	</div>

	<!-- 菜单导航 -->

	<div id="menu">
		<ul class="nav">
			<li class="hover"><a href="http://localhost/me/11.7/Easycms/hd/xuexi/index.html">网站首页</a></li>
			<li><img src="http://localhost/me/11.7/Easycms/Template/default/images/nav_mid.png"></li>
			<li>
				<a href="<?php echo U('Index/Index/index');?>">关于我们</a>
				<dl style="display: none;">
							<?php
		$cid=1;
		$type=son;
		$db=M('category');
		switch ($type) {
			case 'self':
				$cat=$db->find($cid);
				p($cat);exit;
				$data=$db->where("pid=".$cat['pid'])->all();						
				break;
			
			default:
				$data=$db->where("pid=".$cid)->all();
				break;
		}
		foreach ($data as $field) {
			$field['caturl']=getCategoryUrl($field);
		?>
		
						<dt>
							<a href="<?php echo $field['caturl'];?>"><?php echo $field['catname'];?></a>
						</dt>
					<?php };?>					
				</dl>
			</li>
			<li><img src="http://localhost/me/11.7/Easycms/Template/default/images/nav_mid.png"></li>
			<li>
				<a href="http://localhost/me/11.7/Easycms/hd/xinwen/index.html">新闻中心</a>
				<dl style="display: none;">
							<?php
		$cid=2;
		$type=son;
		$db=M('category');
		switch ($type) {
			case 'self':
				$cat=$db->find($cid);
				p($cat);exit;
				$data=$db->where("pid=".$cat['pid'])->all();						
				break;
			
			default:
				$data=$db->where("pid=".$cid)->all();
				break;
		}
		foreach ($data as $field) {
			$field['caturl']=getCategoryUrl($field);
		?>
		
						<dt>
							<a href="<?php echo $field['caturl'];?>"><?php echo $field['catname'];?></a>
						</dt>
					<?php };?>
				</dl>
			</li>
			<li><img src="http://localhost/me/11.7/Easycms/Template/default/images/nav_mid.png"></li>
			<li>
				<a href="http://localhost/me/11.7/Easycms/hd/zhengzhi/index.html">产品展示</a>
				<dl style="display: none;">
							<?php
		$cid=3;
		$type=son;
		$db=M('category');
		switch ($type) {
			case 'self':
				$cat=$db->find($cid);
				p($cat);exit;
				$data=$db->where("pid=".$cat['pid'])->all();						
				break;
			
			default:
				$data=$db->where("pid=".$cid)->all();
				break;
		}
		foreach ($data as $field) {
			$field['caturl']=getCategoryUrl($field);
		?>
		
						<dt>
							<a href="<?php echo $field['caturl'];?>"><?php echo $field['catname'];?></a>
						</dt>
					<?php };?>
				</dl>
			</li>
			<li><img src="http://localhost/me/11.7/Easycms/Template/default/images/nav_mid.png"></li>
			<li>
				<a href="http://localhost/me/11.7/Easycms/hd/gongsi/index.html">人才招聘</a>
				<dl style="display: none;">
							<?php
		$cid=3;
		$type=son;
		$db=M('category');
		switch ($type) {
			case 'self':
				$cat=$db->find($cid);
				p($cat);exit;
				$data=$db->where("pid=".$cat['pid'])->all();						
				break;
			
			default:
				$data=$db->where("pid=".$cid)->all();
				break;
		}
		foreach ($data as $field) {
			$field['caturl']=getCategoryUrl($field);
		?>
		
						<dt>
							<a href="<?php echo $field['caturl'];?>"><?php echo $field['catname'];?></a>
						</dt>
					<?php };?>
				</dl>
			</li>
			<li><img src="http://localhost/me/11.7/Easycms/Template/default/images/nav_mid.png"></li>
			<li><a href="news.html">资料下载</a></li>
			<li><img src="http://localhost/me/11.7/Easycms/Template/default/images/nav_mid.png"></li>
			<li><a href="message.html">在线留言</a></li>
			<li><img src="http://localhost/me/11.7/Easycms/Template/default/images/nav_mid.png"></li>
			<li><a href="contact.html">联系我们</a></li>
		</ul>
	</div>
</body>
</html>